import { getRole } from "../../utils/request"

const state = {
    role:[]
}
const mutations = {
  changeRole(state,arr){
     state.role =arr
  }
}
const actions ={
    roleActions(context){
        getRole().then(res=>{
             context.commit('changeRole',res.data.list)
        })
       
    }
}
const getters = {
    role(state){
        return state.role
    }
}


export default {
    state,
    mutations,
    actions,
    getters,
    namespaced:true
}